
// import { param2Obj } from './utils'

const list = [{

}]

export default {
  list: () => {
    if (list) {
      return {
        data: {
          code: '200',
          message: 'successful'
        }
      }
    } else {
      return {
        data: {
          code: '400',
          message: 'error'
        }
      }
    }
  },
  right_list: (data) => {
    const role = data.url.split('=')[1]
    console.log(role)
    if (role == 'school_gover') {
      return {
        error: 0,
        message: 'successful',
        default_expanded: [11],
        default_checked: [112, 111],
        is__System: '1',
        is__Use: '2',
        area: '所在学校及以下'
      }
    } else if (role == 'institution_gover') {
      return {
        error: 0,
        message: 'successful',
        default_expanded: [11],
        default_checked: [111],
        is__System: '2',
        is__Use: '2',
        area: '所在学院及以下'
      }
    } else if (role == 'student') {
      return {
        error: 0,
        message: 'successful',
        default_expanded: [],
        default_checked: [],
        is__System: '1',
        is__Use: '2',
        area: '个人'
      }
    } else {
      return {
        error: 0,
        message: 'successful',
        default_expanded: [11],
        default_checked: [112],
        is__System: '2',
        is__Use: '1',
        area: '教师及个人'
      }
    }
  },
  right_update: (data) => {
    console.log(data)
    return {
      error: 0,
      message: 'successful'
    }
  }
}
